package org.hsieh.tr.explore.exception;

import org.eclipse.swt.widgets.Shell;
import org.hsieh.tr.explore.logger.LogUtil;

/**
 * 
 * @author xiaowei.ye xiaowei.ye@soyatec.com
 * 
 */
public abstract class ExceptionHandler {

    public static void handle(Exception e) {
	e.printStackTrace();
	LogUtil.getInstance().logError(e.getMessage(), e);
    }

    public static void prompt(Shell shell, Throwable e) {
	LogUtil.getInstance().promptError(shell, e.toString(), e);
    }

    public static void prompt(Shell shell, String message, Throwable e) {
	LogUtil.getInstance().promptError(shell, message, e);
    }
}
